package com.example.aabb;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.RelativeLayout;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class QuestionActivity extends AppCompatActivity {

    private RelativeLayout rlBack;
    private RelativeLayout rl;

    List<Bill> billList = new ArrayList<>();

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.question_activity);
        rlBack = (RelativeLayout) findViewById(R.id.rl_back);
        rl = (RelativeLayout) findViewById(R.id.rl);


        billList = (ArrayList) getIntent().getSerializableExtra("list");

        rlBack.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
        rl.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(QuestionActivity.this, ToActivity.class);
                intent.putExtra("list", (Serializable)billList);

                startActivity(intent);

            }
        });
    }
}